<template>
	<div>
		<h2 class="mb5">基础信息</h2>
		<div class="basc-info">
			<Descriptions :column="2" title="">
				<el-descriptions-item label="源单号">
					<div class="ellipsis2">{{ detailData.odno_f ? detailData.odno_f : detailData.no ? detailData.no
						: '--' }}</div>
				</el-descriptions-item>
				<el-descriptions-item label="创建时间">
					<div class="ellipsis2">{{ detailData.atime_txt || '--' }}</div>
				</el-descriptions-item>
				<el-descriptions-item label="合计金额">
					<div class="ellipsis2 bold font_green">{{ detailData.amount_all || '--' }}</div>
				</el-descriptions-item>
				<el-descriptions-item label="订单类型">
					<div class="ellipsis2">{{ detailData.type_txt || '--' }}</div>
				</el-descriptions-item>
				<el-descriptions-item label="经手人员">
					<div class="ellipsis2">{{ detailData.uname_cp || '--' }}</div>
				</el-descriptions-item>
				<el-descriptions-item label="配送方式">
					<div class="ellipsis2">{{ detailData.shipp_title || '--' }}</div>
				</el-descriptions-item>
				<el-descriptions-item label="打印次数">
					<div class="ellipsis2">{{ detailData.print || 0 }} 次</div>
				</el-descriptions-item>
				<el-descriptions-item label="备注/其他">
					<div class="ellipsis2 font_bule under-line" @click="handleTxt">
						{{ detailData.txt_ls && detailData.txt_ls.length > 0 ?
							detailData.txt_ls.length + ' 条备注' : '暂无备注'
						}}
					</div>
				</el-descriptions-item>
			</Descriptions>
		</div>
	</div>
</template>

<script setup>
import { ref, onMounted, defineProps, defineEmits, getCurrentInstance, watch, computed, nextTick } from '@vue/composition-api'
import Descriptions from "@/components/commV2/Description/descriptions.vue"

const props = defineProps({
	detailData: {
		type: Object,
		default: () => {}
	}
})
const emit = defineEmits(['handleTxtLs'])
const handleTxt = () => {
	emit('handleTxtLs')
}

onMounted(() => { })

defineExpose({})

</script>

<style lang="scss" scoped>

.basc-info {
	background: #ffffff;
	padding: 14px;
	border-radius: 8px;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
	border: 1px solid #e2e8f0;
	position: relative;

	::v-deep .el-descriptions__body {
		background-color: transparent !important;
	}

	::v-deep .el-descriptions-item__label {
		color: #6b7280 !important;
		font-weight: 500;
		font-size: 14px;
	}

	::v-deep .el-descriptions-item__content {
		color: #111827 !important;
		font-weight: 400;
	}
}
</style>